﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace Jy123.Web.Manage
{
    public partial class MGroup1 : MgConfig
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Verify("MGroup.aspx");
            if (!IsPostBack)
            {
                if (Request.QueryString["msg"] != null)
                {
                    if (Request.QueryString["msg"] == "ok")
                    {
                        Message = MessageBox("添加页面成功！", MsgType.ok);
                    }
                }
            }
        }

        protected void btnAddGrup_Click(object sender, EventArgs e)
        {
            Model.Manage_Page mpage = new Jy123.Model.Manage_Page();
            mpage.PName = txtGroupName.Value;
            mpage.UpID = 0;
            mpage.Url = "#";
            try
            {
                new BLL.Manage_Page().Add(mpage);
                Response.Redirect(Request.Url.ToString() + "?msg=ok", false);
            }
            catch
            {
                Message = MessageBox("操作失败！", MsgType.error);
            }
        }
    }
}
